package com.edt.ichannel.api.service.impl;

import com.edt.ichannel.api.common.constant.CommonConstant;
import com.edt.ichannel.api.common.entity.ActionResult;
import com.edt.ichannel.api.dao.BonusLogDao;
import com.edt.ichannel.api.entiy.local.BonusLog;
import com.edt.ichannel.api.service.BonusLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * BonusLog服务接口实现类
 * @author 李爽
 * @date 2018-06-13
 */
@Service
public class BonusLogServiceImpl implements BonusLogService {

    @Resource
    private BonusLogDao bonuslogDao;




    /**
    * 添加保存信息
    *
    * @param bonuslog 发展奖流水
    * @return ActionResult
    * @author 李爽
    * @date 2018-06-13
    */
    @Override
    public ActionResult saveBonusLog(BonusLog bonuslog) {
        ActionResult actionResult = new ActionResult();

        bonuslogDao.saveBonusLog(bonuslog);
        actionResult.setMessage("添加成功。");
        actionResult.setSuccess(CommonConstant.ACTIONRESULT_TRUE);
	
        return actionResult;
    }

    @Override
    public BonusLog selectBonusLogByOrderCode(String orderCode) {
        return bonuslogDao.selectByOrderCode(orderCode);
    }


}